package com.imax.emap.util
{
	public class EMapUtil
	{
		public function EMapUtil()
		{
		}
		static public function getNumberInRange(val:Number,min:Number,max:Number):Number{
			if(min >max) {
				trace("fuck,min is bigger than max,ass hole");
				throw Error("函数的最小值大过最大值，请看api老大");
			}
			else{
				if (val<min) return min;
				if (val>max) return max;				
			}
			return val;
		}
		
		static public function getRadianByDegree(degree:Number):Number{
			return degree * Math.PI/180;
		}
		
		static public function getDegreeByRadian(radian:Number):Number{
			return radian * 180/Math.PI;
;
		}
	}
}